Something in common
[crypto]
Something in common
We've managed to gather the details in the given file. We need a professional cryptographer to decipher the message. Are you up to the task?
Recon
Common modulus w/ two different pub exponents that are coprime.
Code
from crypto_commons.generic import long_to_bytes
from gmpy2 import invert
from gmpy2 import mpz
from crypto_commons.rsa.rsa_commons import extended_gcd
n = 5196832088920565976847626600109930685983685377698793940303688567224093844213838345196177721067370218315332090523532228920532139397652718602647376176214689
e1 = 15
e2 = 13
c1 = 2042084937526293083328581576825435106672034183860987592520636048680382212041801675344422421233222921527377650749831658168085014081281116990629250092000069
c2 = 199621218068987060560259773620211396108271911964032609729865342591708524675430090445150449567825472793342358513366241310112450278540477486174011171344408
d, x, y = extended_gcd(e1, e2)
print(x, y)
if x < 0:
c1 = invert(c1, n)
x = -x
if y < 0:
c2 = invert(c2, n)
y = -y
m = pow(pow(c1, x, n) * pow(c2, y, n), 1, n)
print(long_to_bytes(m))